#!/bin/bash

if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
    set -x
fi

set -eu
set -o pipefail

if [[ $DISTRO_NAME = "centos7" ]]; then
    sed -i -E 's/(GRUB_CMDLINE_LINUX_DEFAULT=")(.+)(")/\1\2 rd.iscsi.firmware=1"/' /etc/default/grub
    grub2-mkconfig -o /boot/grub2/grub.cfg
fi
